1. Field of the Invention
The present invention relates to removing blocking artifacts and ringing noise, and more particularly, to a filtering method and an apparatus for removing blocking artifacts and ringing noise caused when processing a video frame on a block-by-block basis.
2. Description of the Related Art
In general, video data is encoded by processing video frames in block units. In particular, according to video data encoding standards such as moving picture experts group (MPEG) and H.263, video data is encoded by performing a discrete cosine transform (DCT) and quantization on video frames in block units. However, encoding video data in block units causes blocking artifacts and ringing noise in video frames. A video frame containing the blocking artifacts has boundaries between blocks of the video frame, which were not contained in the original video frame, thereby causing discontinuity between adjacent pixels. Also, in case of a video frame containing the ringing noise, a borderline of an object in the video frame is not smoothly depicted, e.g., the borderline may be irregular. The higher a compression rate of video data, the more serious the blocking artifacts and the ringing noise.
To filter the blocking artifacts and the ringing noise, it is important to first find an exact region of the video frame in which the blocking artifacts and/or ringing noise occur(s). If the exact region is not found, an edge region present in the original image frame may be mistakenly regarded as being generated due to the blocking artifacts and removed, thereby deteriorating the quality of the image.
Conventionally, an edge region of a reproduced pixel block is detected by measuring values such as the distributions of brightness, luminance, and color, of pixels on boundaries between 8×8 or 4×4 pixel blocks, and comparing the measured values with predetermined critical values. The critical values are experimentally obtained by measuring the distributions of the above pixel values, such as brightness, luminance, and color, and finding the relationship between the distributions and whether the edge region is present or not in an image frame.
To measure the distribution of pixel values, pixel values in a boundary region between adjacent blocks must be checked in the vertical or horizontal direction. However, in fact, the checking of every pixel value is almost impossible because of a large amount of calculation and complexity. In particular, calculation of pixel values in the vertical direction requires continuous memory access, which is out of the question.